//! @Author: DengLibin 榆霖
//! @Date:  2022-04-21 10:10:38
//! @Description: 路由配置
use actix_web::web;
use actix_web::Scope;
use crate::controller::article_controller;
use crate::controller::async_user_controller;
use crate::controller::sys_controller;
use crate::controller::user_controller;
use crate::controller::file_controller;

/// @Author: DengLibin 榆霖
/// @Date:  2022-04-21 11:56:40
/// @Description: 路由配置
pub fn route_config(cfg: &mut web::ServiceConfig) {
    info!("注册controller路由");
    // domain includes: /products/{product_id}/parts/{part_id}
    let mut services: Vec<Scope> = vec![];
    services.push(sys_controller::route());
    services.push(user_controller::route());
    services.push(async_user_controller::route());
    services.push(file_controller::route());
    services.push(article_controller::route());

    for s in services {
        cfg.service(s);
    }
    info!("注册controller路由---完成")
}




